본 게시글의 원문은 Yann Debray의 MATLAB with Python Book 입니다. 해당 책은 MIT 라이센스를 따르기 때문에 개인적으로 번역하여 재배포 합니다. 본 포스팅에는 추후 유료 수익을 위한 광고가 부착될 수도 있습니다.

MIT License

Copyright (c) 2023 Yann Debray

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

본 게시물에서 활용된 소스 코드들은 모두 Yann Debray의 GitHub Repo에서 확인할 수 있습니다.

7. Python과 함께하는 Simulink

Simulink은 물리 및 제어 시스템의 모델링, 시뮬레이션 및 코드 생성을 가능하게 하는 MATLAB 기반 소프트웨어입니다. 이는 자동차 차량 동역학이나 비행 제어와 같은 애플리케이션에서 임베디드 시스템 개발에 많이 사용됩니다.

MATLAB Expo 2023에서, 제 동료 Weiwu와 저는 Simulink가 Python과 함께 사용되는 4가지 일반적인 시나리오를 살펴보았습니다. 이 시나리오에서 Weiwu는 Simulink 사용을, 저는 Python 사용을 대표했습니다 (일부 경우에는 동일한 사용자가 사용하기도 합니다).

이 장에서 탐구한 4가지 시나리오:

  • Python 코드를 라이브러리로 가져와 Simulink와 공동 실행
  • TensorFlow 및 PyTorch 모델을 시뮬레이션 및 코드 생성에 통합
  • Python에서 직접 Simulink 모델 시뮬레이션
  • 배포를 위해 Simulink 모델을 Python 패키지로 내보내기